<h1>Editing user</h1>

<%= error_messages_for :user %>

<% form_for(:user, :url => user_path(@user), :html => { :method => :put }) do |f| %>
  <p>
    <b>Username</b><br />
    <%= f.text_field :username %>
  </p>

  <p>
    <b>Password</b><br />
    <%= f.text_field :password %>
  </p>

  <p>
    <b>Email</b><br />
    <%= f.text_field :email %>
  </p>

  <p>
    <b>Firstname</b><br />
    <%= f.text_field :firstname %>
  </p>

  <p>
    <b>Lastname</b><br />
    <%= f.text_field :lastname %>
  </p>

  <p>
    <b>Created at</b><br />
    <%= f.date_select :created_at %>
  </p>

  <p>
    <b>Deleted at</b><br />
    <%= f.date_select :deleted_at %>
  </p>

  <p>
    <%= submit_tag "Update" %>
  </p>
<% end %>

<%= link_to 'Show', user_path(@user) %> |
<%= link_to 'Back', users_path %>